package Screens;

import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;

import Botao.BotaoConfig;
import Botao.BotaoCreditos;
import Botao.BotaoPlay;
import Botao.BotaoTreinar;

public class TelaInicial extends Screen {
	
	BotaoPlay botao;
	BotaoTreinar botaoTreinar;
	BotaoConfig botaoConfig;
	BotaoCreditos botaoCredito;
	
	
	

	public TelaInicial(int X, int Y, int Width, int Height, String fileNome) {
		super(X, Y, Width, Height, fileNome);
		// TODO Auto-generated constructor stub
		int posX =this.width/2; 
		int posY = this.height/2;
		botao= new BotaoPlay(posX, posY, "/botoes/botao_jogar.png", "/botoes/botao_jogar_over.png");
		botaoTreinar = new BotaoTreinar(posX, posY+60, "/botoes/botao_treinar.png", "/botoes/botao_trenar_over.png");
		botaoConfig = new BotaoConfig(posX, posY+120, "/botoes/botao_config.png", "/botoes/botao_config_over.png");
		botaoCredito = new BotaoCreditos(posX, posY+180, "/botoes/botao_creditos.png", "/botoes/botao_creditos_over.png");
	}

	@Override
	public void Draw(Graphics2D dbg) {
		// TODO Auto-generated method stub
		if(fundo!=null){
			dbg.drawImage(fundo, x, y, null);
			botao.Draw(dbg);
			botaoTreinar.Draw(dbg);
			botaoConfig.Draw(dbg);
			botaoCredito.Draw(dbg);
		}
		
		
	}

	@Override
	public void Update(long diffTime) {
		// TODO Auto-generated method stub
		botao.Update(diffTime);
		botaoTreinar.Update(diffTime);
		botaoConfig.Update(diffTime);
		botaoCredito.Update(diffTime);
	}
	
	

	@Override
	public void mouseMoved(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseMoved(e);
		botaoTreinar.mouseMoved(e);
		botaoConfig.mouseMoved(e);
		botaoCredito.mouseMoved(e);
	}

	@Override
	public void mouseDragged(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseDragged(e);
		botaoTreinar.mouseDragged(e);
		botaoConfig.mouseDragged(e);
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseReleased(e);
		botao.mouseReleased(e);
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mousePressed(e);
		botaoTreinar.mousePressed(e);
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseExited(e);
		botaoTreinar.mouseExited(e);
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseEntered(e);
		botaoTreinar.mouseEntered(e);
		
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		botao.mouseClicked(e);
		botaoTreinar.mouseClicked(e);
		botaoConfig.mouseClicked(e);
		botaoCredito.mouseClicked(e);
	}

	@Override
	public void tratadorTecladoPress(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void tratadorTecladoReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void setaOpcao(int opcao) {
		// TODO Auto-generated method stub
		
	}

	
	

}
